package com.zjt.smart.api.server;

import com.google.gson.JsonElement;

import java.util.Map;

/**
 * @author zhengjianting
 * @time 2017/8/25 0025 上午 11:18
 */

public abstract class BaseServer {
    public static int PARSE = 1001;             // Some error in parse JSON.
    public static int NO_MORE = 1002;           // No More Data from server.
    public static int SYNTAX = 1003;            // JSONNull
    public static int ACTIVATE = 1004;          // Activate fail
    public static int DATA_INCOMPLETE = 1005;   // Data incomplete in parallel request
    public static int NO_CONTENT = 204;         // no content

    public abstract String getDomain();

    public abstract Class getHolderClass();

    public abstract int getOkCode();

    public interface ResponseHolder {
        int getCode();
        String getMsg();
        JsonElement getResult();
    }

    public Map<String ,Object> getHeader() {
        return null;
    }
}
